import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(
    home: Scaffold(
      appBar: AppBar(
        title: const Text("Indicator Demo"),
      ),
      body: LinearProgressIndicatorWidget(),
    ),
  ));
}

class LinearProgressIndicatorWidget extends StatefulWidget {
  @override
  _LinearProgressIndicatorWidgetState createState() => _LinearProgressIndicatorWidgetState();
}

class _LinearProgressIndicatorWidgetState extends State<LinearProgressIndicatorWidget> {

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        //  线性进度条高度
        SizedBox(
          height: 20,
          child: LinearProgressIndicator(
            backgroundColor: Colors.grey[200],
            valueColor: const AlwaysStoppedAnimation(Colors.blueAccent),
            value: .6,
          ),
        ),
        SizedBox(
          height: 100,
          width: 100,
          child: CircularProgressIndicator(
            backgroundColor: Colors.grey[200],
            valueColor: const AlwaysStoppedAnimation(Colors.greenAccent),
            value: .7,
          ),
        ),
      ],
    );
  }
}
